<?php

/**
 * Datos form base class.
 *
 * @package    form
 * @subpackage datos
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BaseDatosForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'cedula'       => new sfWidgetFormInputHidden(),
      'nombre'       => new sfWidgetFormInput(),
      'apellido'     => new sfWidgetFormInput(),
      'fechanan'     => new sfWidgetFormDate(),
      'edocivil'     => new sfWidgetFormInput(),
      'dir'          => new sfWidgetFormInput(),
      'sector'       => new sfWidgetFormInput(),
      'casa'         => new sfWidgetFormInput(),
      'telf'         => new sfWidgetFormInput(),
      'cel'          => new sfWidgetFormInput(),
      'tpzona'       => new sfWidgetFormInput(),
      'nacionalidad' => new sfWidgetFormInput(),
      'edad'         => new sfWidgetFormInput(),
      'sexo'         => new sfWidgetFormInput(),
      'correo'       => new sfWidgetFormInput(),
      'ocupacion'    => new sfWidgetFormInput(),
      'jefe'         => new sfWidgetFormInputCheckbox(),
      'trabaja'      => new sfWidgetFormInputCheckbox(),
      'cod_fam'      => new sfWidgetFormInput(),
      'ing_mensual'  => new sfWidgetFormInput(),
      'instruccion'  => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'cedula'       => new sfValidatorPropelChoice(array('model' => 'Datos', 'column' => 'cedula', 'required' => false)),
      'nombre'       => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'apellido'     => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'fechanan'     => new sfValidatorDate(array('required' => false)),
      'edocivil'     => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'dir'          => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'sector'       => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'casa'         => new sfValidatorString(array('max_length' => 5, 'required' => false)),
      'telf'         => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'cel'          => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'tpzona'       => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'nacionalidad' => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'edad'         => new sfValidatorInteger(array('required' => false)),
      'sexo'         => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'correo'       => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'ocupacion'    => new sfValidatorString(array('max_length' => 50, 'required' => false)),
      'jefe'         => new sfValidatorBoolean(array('required' => false)),
      'trabaja'      => new sfValidatorBoolean(array('required' => false)),
      'cod_fam'      => new sfValidatorInteger(array('required' => false)),
      'ing_mensual'  => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'instruccion'  => new sfValidatorString(array('max_length' => 50, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('datos[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Datos';
  }


}
